import { createApp } from 'vue'
import './style.css'
import './assets/fonts/iconfont.css'
import App from './App.vue'
import 'element-plus/dist/index.css'
import router from './router/index'
import './router/permission'
import {createPinia} from 'pinia'
import piniaPluginPersistedstate from 'pinia-plugin-persistedstate'
import { permission } from './directive/permission'
const pinia = createPinia()
pinia.use(piniaPluginPersistedstate)

const app=createApp(App);

//全局 自定义指令
app.directive('color', {
    mounted(el, binding) {
        el.style.color = binding.value
    }
})

app.directive('permission',permission)
 
app.use(router).use(pinia).mount('#app')
